package com.cy.detectsys.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import lombok.Data;

/**
 * 
 * @TableName sys_menu
 */
@TableName(value ="sys_menu")
@Data
public class SysMenu implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 菜单名称
     */
    private String kySysMenuName;

    /**
     * 
     */
    private Date createTime;

    /**
     * 上级菜单
     */
    private Integer kySysParentId;

    /**
     * 显示顺序
     */
    private Integer kySysOrderNum;

    /**
     * 路由地址
     */
    private String kySysPath;

    /**
     * 组件路径
     */
    private String kySysComponent;

    /**
     * 路由参数
     */
    private String kySysQuery;

    /**
     * 是否外链
     */
    private Integer kySysIsFrame;

    /**
     * 是否缓存
     */
    private Integer kySysIsCache;

    /**
     * 菜单类型
     */
    private String kySysMenuType;

    /**
     * 是否显示
     */
    private String kySysVisible;

    /**
     * 权限
     */
    private String kySysPerms;

    /**
     * 图标
     */
    private String kySysIcon;

    /**
     * 
     */
    private Integer kySysStatus;

    /**
     * 
     */
    private Integer deleted;

    /**
     * 
     */
    private String createUser;

    /**
     * 
     */
    private String updateUser;

    /**
     * 
     */
    private Date updateTime;

    /**
     * 菜单所属系统
     */
    private Integer kySystem;

    /** 子菜单 */
    @TableField(exist = false)
    private List<SysMenu> children = new ArrayList<SysMenu>();

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SysMenu other = (SysMenu) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getKySysMenuName() == null ? other.getKySysMenuName() == null : this.getKySysMenuName().equals(other.getKySysMenuName()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getKySysParentId() == null ? other.getKySysParentId() == null : this.getKySysParentId().equals(other.getKySysParentId()))
            && (this.getKySysOrderNum() == null ? other.getKySysOrderNum() == null : this.getKySysOrderNum().equals(other.getKySysOrderNum()))
            && (this.getKySysPath() == null ? other.getKySysPath() == null : this.getKySysPath().equals(other.getKySysPath()))
            && (this.getKySysComponent() == null ? other.getKySysComponent() == null : this.getKySysComponent().equals(other.getKySysComponent()))
            && (this.getKySysQuery() == null ? other.getKySysQuery() == null : this.getKySysQuery().equals(other.getKySysQuery()))
            && (this.getKySysIsFrame() == null ? other.getKySysIsFrame() == null : this.getKySysIsFrame().equals(other.getKySysIsFrame()))
            && (this.getKySysIsCache() == null ? other.getKySysIsCache() == null : this.getKySysIsCache().equals(other.getKySysIsCache()))
            && (this.getKySysMenuType() == null ? other.getKySysMenuType() == null : this.getKySysMenuType().equals(other.getKySysMenuType()))
            && (this.getKySysVisible() == null ? other.getKySysVisible() == null : this.getKySysVisible().equals(other.getKySysVisible()))
            && (this.getKySysPerms() == null ? other.getKySysPerms() == null : this.getKySysPerms().equals(other.getKySysPerms()))
            && (this.getKySysIcon() == null ? other.getKySysIcon() == null : this.getKySysIcon().equals(other.getKySysIcon()))
            && (this.getKySysStatus() == null ? other.getKySysStatus() == null : this.getKySysStatus().equals(other.getKySysStatus()))
            && (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted()))
            && (this.getCreateUser() == null ? other.getCreateUser() == null : this.getCreateUser().equals(other.getCreateUser()))
            && (this.getUpdateUser() == null ? other.getUpdateUser() == null : this.getUpdateUser().equals(other.getUpdateUser()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getKySystem() == null ? other.getKySystem() == null : this.getKySystem().equals(other.getKySystem()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getKySysMenuName() == null) ? 0 : getKySysMenuName().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getKySysParentId() == null) ? 0 : getKySysParentId().hashCode());
        result = prime * result + ((getKySysOrderNum() == null) ? 0 : getKySysOrderNum().hashCode());
        result = prime * result + ((getKySysPath() == null) ? 0 : getKySysPath().hashCode());
        result = prime * result + ((getKySysComponent() == null) ? 0 : getKySysComponent().hashCode());
        result = prime * result + ((getKySysQuery() == null) ? 0 : getKySysQuery().hashCode());
        result = prime * result + ((getKySysIsFrame() == null) ? 0 : getKySysIsFrame().hashCode());
        result = prime * result + ((getKySysIsCache() == null) ? 0 : getKySysIsCache().hashCode());
        result = prime * result + ((getKySysMenuType() == null) ? 0 : getKySysMenuType().hashCode());
        result = prime * result + ((getKySysVisible() == null) ? 0 : getKySysVisible().hashCode());
        result = prime * result + ((getKySysPerms() == null) ? 0 : getKySysPerms().hashCode());
        result = prime * result + ((getKySysIcon() == null) ? 0 : getKySysIcon().hashCode());
        result = prime * result + ((getKySysStatus() == null) ? 0 : getKySysStatus().hashCode());
        result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
        result = prime * result + ((getCreateUser() == null) ? 0 : getCreateUser().hashCode());
        result = prime * result + ((getUpdateUser() == null) ? 0 : getUpdateUser().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getKySystem() == null) ? 0 : getKySystem().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", kySysMenuName=").append(kySysMenuName);
        sb.append(", createTime=").append(createTime);
        sb.append(", kySysParentId=").append(kySysParentId);
        sb.append(", kySysOrderNum=").append(kySysOrderNum);
        sb.append(", kySysPath=").append(kySysPath);
        sb.append(", kySysComponent=").append(kySysComponent);
        sb.append(", kySysQuery=").append(kySysQuery);
        sb.append(", kySysIsFrame=").append(kySysIsFrame);
        sb.append(", kySysIsCache=").append(kySysIsCache);
        sb.append(", kySysMenuType=").append(kySysMenuType);
        sb.append(", kySysVisible=").append(kySysVisible);
        sb.append(", kySysPerms=").append(kySysPerms);
        sb.append(", kySysIcon=").append(kySysIcon);
        sb.append(", kySysStatus=").append(kySysStatus);
        sb.append(", deleted=").append(deleted);
        sb.append(", createUser=").append(createUser);
        sb.append(", updateUser=").append(updateUser);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", kySystem=").append(kySystem);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}